| !ImageMap.!Run
| (C) David McCormack
| Load the main !ImageMap software

IconSprites <Obey$Dir>.!Sprites

Set ImageMap$Path <Obey$dir>.
Set ImageMap$Dir  <Obey$dir>

| Set up file names
|
Set File$Type_B09 ImageMap
If "<File$Type_FAF>" = "" then Set File$Type_FAF HTML
If "<File$Type_695>" = "" then Set File$Type_695 GIF
If "<File$Type_1BC>" = "" then Set File$Type_1BC Imagen
If "<File$Type_259>" = "" then Set File$Type_259 Server
If "<File$Type_FF1>" = "" then Set File$Type_FF1 RawData

| Set up double click actions
|
Set Alias$@RunType_B09 Run ImageMap:!Run -load %%*0
Set Alias$@RunType_259 Run ImageMap:!Run -load %%*0
If "<Alias$@RunType_1BC>" = "" then Set Alias$@RunType_1BC Run ImageMap:!Run -load %%*0

| Relevent Dosmap commands
|
DosMap MAP  &259
DosMap GIF  &695
DosMap HTM  &FAF

| Check for support system variables
|
If "<Wimp$Scrap>"    = "" then Error ImageMap requires a !Scrap directory to have been setup.
If "<ChangeFSI$Dir>" = "" then Error ImageMap requires !ChangeFSI to have been seen by the filing system.

| Check for BorderUtil support module
|
RMEnsure UtilityModule 3.50 RMEnsure BorderUtils 0.02 RMload System:Modules.BorderUtil
RMEnsure UtilityModule 3.50 RMEnsure BorderUtils 0.02 BorderUtils module is too old or is not available. You must upgrade before running ImageMap.

| Check for ColourPicker support module
|
RMEnsure ColourPicker 0.31 RMload System:Modules.Picker
RMEnsure ColourPicker 0.31 ColourPicker module is too old or is not available. You must upgrade before running ImageMap.

| Check for Imagen support module
|
RMEnsure Imagen 1.00 RMload ImageMap:RMStore.Imagen
RMEnsure Imagen 1.00 Imagen module is too old and must be updated.

| Check for Jpeg support modules
|
RMEnsure UtilityModule 3.60 RMEnsure SpriteExtend 0.98 Run ImageMap:Scripts.!JpegLoad 

| PCA support
|
If "<PCAResources$Dir>"<> "" Then RMEnsure PCASupport 0.00 UnSet ImageMap$PCABoot   
If "<PCAResources$Dir>" = "" Then Set ImageMap$PCABoot Not_Available
If "<ImageMap$PCABoot>" = "" then WimpTask <Obey$Dir>.Scripts.!PCABoot

| Run main code
|
WimpSlot -min  256K -max 256K
WimpSlot -min  172K -max 172K
/ImageMap:!RunImage %*0
